package com.bes.sdk.message;

public class ECGInfo {
    String HRValue;
    String DBPValue;
    String SBPValue;
    String RRValue;

    public ECGInfo(String HRValue, String DBPValue, String SBPValue, String RRValue) {
        this.HRValue = HRValue;
        this.DBPValue = DBPValue;
        this.SBPValue = SBPValue;
        this.RRValue = RRValue;
    }

    public ECGInfo(){

    }
    public ECGInfo(String str){

        String[] parts = str.split(" ");

        // 将分割后的字符串数组中的元素存入变量
        HRValue = parts[0]; // "part1"
        DBPValue = parts[1]; // "part2"
        SBPValue = parts[2]; // "part3"
        RRValue = parts[3]; // "part4"
    }


    // Getter and Setter methods
    public String getHRValue() {
        return HRValue;
    }

    public void setHRValue(String HRValue) {
        this.HRValue = HRValue;
    }

    public String getDBPValue() {
        return DBPValue;
    }

    public void setDBPValue(String DBPValue) {
        this.DBPValue = DBPValue;
    }

    public String getSBPValue() {
        return SBPValue;
    }

    public void setSBPValue(String SBPValue) {
        this.SBPValue = SBPValue;
    }

    public String getRRValue() {
        return RRValue;
    }

    public void setRRValue(String RRValue) {
        this.RRValue = RRValue;
    }

    @Override
    public String toString() {
        return HRValue + " " + DBPValue + " " + SBPValue + " " + RRValue;
    }

    public void fromString(String str) {
        // 从字符串转换 ECGInfo 的静态工厂方法

    }

}
